<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
<meta charset="UTF-8"></meta>
<title>Insert title here</title>
<link rel="stylesheet" type="text/css"
	th:href="@{/static/easyui/themes/default/easyui.css}"></link>
<link rel="stylesheet" type="text/css"
	th:href="@{/static/easyui/themes/icon.css}"></link>
<script th:src="@{/static/easyui/jquery.min.js}"></script>
<script th:src="@{/static/easyui/jquery.easyui.min.js}"></script>
<script th:src="@{/static/easyui/locale/easyui-lang-zh_CN.js}"></script>
<script th:src="@{/static/js/kellyfeng.js}"></script>
</head>
<body class="easyui-layout">
	<div id="layout" th:replace="page :: layout"></div>
	<div style="text-align: center; padding: 0 0"
		data-options="region:'center'">

		<div class="easyui-layout" style="width: 100%; height: 100%;">

			<div data-options="region:'center',title:'消息列表',iconCls:'icon-ok'"
				style="width: 100%; height: 70%;">
				<table class="easyui-datagrid" style="width: 100%; height: 100%;"
					data-options="singleSelect:true,collapsible:true,url:'/spittlesrest',method:'get', pagination:true">
					<thead>
						<tr>
							<th data-options="field:'id', resizable:true, sortable:true"
								width='3%'>ID</th>
							<th
								data-options="field:'time', sortable:true, formatter:ftFormatTime"
								width='8%'>时间</th>
							<th data-options="field:'latitude', align:'right', sortable:true"
								width='5%'>latitude</th>
							<th data-options="field:'longitude'" width='5%'>longitude</th>
							<th data-options="field:'message'" width='80%'>消息</th>
						</tr>
					</thead>
				</table>
			</div>

			<div data-options="region:'south',split:true"
				style="width: 100%; height: 10%;">
				<form method="POST" name="spittleForm" id="spittleForm"
					style="width: 100%; height: 100%; padding: 0px 0px;">
					<input type="hidden" name="latitude" /> <input type="hidden"
						name="longitude" />
					<textarea name="message"
						style="width: 90%; height: 100%; padding: 5px 0px"
						class="easyui-textbox" data-options="multiline:true"></textarea>

					<!-- 				<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />  -->
					<input type="submit" value="发送" class="easyui-linkbutton"
						style="font-size: 20px; padding: 0px 0px; height: 100%; width: 9%;" />
				</form>
			</div>
		</div>
	</div>

	<script>
		$(document).ready(function() {

		});

		function ftFormatTime(val, row) {
			return timeFormat(new Date(val));
		}
	</script>
</body>
</html>